package view;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.MouseAdapter;

import javax.swing.JPanel;

import main.KeyDefinitions;

import data.Images;

public class EditControlLabel extends JPanel{
	String lblText;
	Images images;
	Image lblImage;
	public EditControlLabel(String _lblText){
		images = new Images();
		lblImage = images.getImage("EditControlLabel");
		lblText = _lblText;
		Dimension lblSize = new Dimension(105,25);
		this.setSize(lblSize);
		this.setPreferredSize(lblSize);
		this.setMinimumSize(lblSize);
		this.setOpaque(false);
	}
	public void paint(Graphics g){
		Font font = new Font("Arial", Font.BOLD, 12);
		g.setColor(Color.green);
		g.setFont(font);
		if(lblText.equals("Cycling") || lblText.equals("Selection") || lblText.equals("Direction") || lblText.equals("Other")){
			g.setColor(Color.GREEN.darker().darker());
		}
		g.drawImage(lblImage, 0, 0, lblImage.getWidth(this), lblImage.getHeight(this), this);
		
		g.drawString(lblText, 10, 14);
	}
}
